package de.gwtprime.client.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;

import de.gwtprime.client.event.handler.VotesLoadedEventHandler;
import de.gwtprime.shared.requestFactory.VoteProxy;

public class VotesLoadedEvent extends GwtEvent<VotesLoadedEventHandler>{

public static Type<VotesLoadedEventHandler> TYPE = new Type<VotesLoadedEventHandler>();
	
	private List<VoteProxy> votes;
	public VotesLoadedEvent(List<VoteProxy> votes){
		this.setVotes(votes);
	}
	
	@Override
	public Type<VotesLoadedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(VotesLoadedEventHandler handler) {
		handler.onVotesLoaded(this);
		
	}

	public List<VoteProxy> getVotes() {
		return votes;
	}

	public void setVotes(List<VoteProxy> votes) {
		this.votes = votes;
	}


}
